import React, { useCallback } from 'react';
import { Popup, Button } from 'antd-mobile';
import UploadOss from '@/component/UploadOss';
import styles from './index.less';

interface AvapopProps {
  visible: boolean;
  onClose: () => void;
}

const Avapop: React.FC<AvapopProps> = ({ visible, onClose }) => {
  const handleSetFilesURL = useCallback(() => {}, []);

  return (
    <Popup visible={visible} onMaskClick={onClose} className={styles.pop}>
      <UploadOss onSetFilesURL={handleSetFilesURL} isVisible={visible}>
        <Button block color="primary" size="large">
          上传头像
        </Button>
      </UploadOss>
    </Popup>
  );
};

export default Avapop;
